﻿using UnityEngine;

public class Prop : BaseMono, IOnExplode
{
	public bool Enable = false;
	public PropInfo Info;

	public void Init(PropInfo info)
	{
		Info = info;
		Enable = false;
	}

	public void OnExplode() 
	{
		SetVisible(false);
	}

	public void SetVisible(bool visible)
	{
		if (Info.Type != PropTypy.Door)
		{
			gameObject.SetActive(visible);
		}
	}

	public void Clear()
	{
		Destroy(gameObject);
	}
}
